//
//  UIColor+HMColorAddition.m
//  BlackHorseLine
//
//  Created by made on 17/3/12.
//  Copyright © 2017年 made. All rights reserved.
//

#import "UIColor+HMColorAddition.h"

@implementation UIColor (HMColorAddition)

+ (UIColor *)colorWithHex:(uint32_t)hex
{
    uint8_t r = (hex & 0xff0000) >> 16;
    uint8_t g = (hex & 0x00ff00) >> 8;
    uint8_t b = (hex & 0x0000ff);
    
    return [UIColor colorWithRed:r / 255.f green:g / 255.f blue:b / 255.f alpha:1];
}

@end
